<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>菜鸟教程 React 实例</title>
    <script src="https://cdn.bootcss.com/react/15.4.2/react.min.js"></script>
    <script src="https://cdn.bootcss.com/react/15.4.2/react-dom.min.js"></script>
    <script src="https://cdn.bootcss.com/babel-standalone/6.22.1/babel.min.js"></script>
  </head>
  <body>
    <div id="example"></div>
    <!-- type="text/babel" javascript-->
    <script  type="text/javascript">
      /*var title = '抵制诱惑，好好学习';*/
      var Success = React.createClass({
        getInitialState:
        propTypes:{
          title:React.PropTypes.string.isRequired
        },
        render: function() {
          return (
          <div>
            <p>{this.props.title}</p>
          </div>
          )
        }
      });

      ReactDOM.render(
        <Success title={title}/>,
        document.getElementById('example')
      );
    </script>
  </body>
</html>